package com.data.JVM.gclog;

/**
 * Created by wangbing on 2018/6/2.
 */

/**
 * -verbose:gc -Xms20m -Xmx20m -Xmn10m -XX:+PrintGCDetails -XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=1 -XX:+PrintTenuringDistribution
 *
 * GC参数
 *
 * 长期存活的对象进入老年代
 */
public class demo03 {
    private static final int _1M = 1024*1024;


    public static void testTenuringThreshold(){
        byte[] allocation1,allocation2,allocation3;
        allocation1 = new byte[_1M/4];

        allocation2 = new byte[4*_1M];
        allocation3 = new byte[4*_1M];
        allocation3 = null;
        allocation3 = new byte[4*_1M];

    }

    public static void main(String[] args) {
        testTenuringThreshold();
    }
}
